home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / QuickDraw / Virtual Sphere 1.0.1 / Virtual Sphere Sample Code 1.1 / Globals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-25  |  2.6 KB  |  91 lines  |  [TEXT/MPS ]

  1. /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. /* Globals.h
  3. /*
  4. /* Author: Michael Chen, Human Interface Group / ATG
  5. /* Copyright © 1991-1993 Apple Computer, Inc.  All rights reserved.
  6. /*
  7. /* Part of Virtual Sphere Sample Code Release v1.1
  8. /*•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••*/
  9.  
  10. #ifndef __GLOBALS__
  11. #define __GLOBALS__
  12.  
  13.  
  14. /*=================================================================================================
  15. /* LightSpeed C dependencies
  16. /*-------------------------------------------------------------------------------------------------*/
  17. #ifdef THINK_C
  18.  
  19. /* Set flag for compiling a version using FPU or not */ 
  20. #if __option (mc68020)
  21.     #if __option (mc68881)
  22.         #define    qUseFPUand020    true
  23.     #endif
  24. #endif
  25.  
  26. #endif THINK_C
  27.  
  28.  
  29. /*=================================================================================================
  30. /* MPW C dependencies
  31. /*-------------------------------------------------------------------------------------------------*/
  32. #ifdef applec
  33.  
  34. /* Set flag for compiling a version using FPU or not */ 
  35. #ifdef    mc68020
  36.     #ifdef mc68881
  37.         #define    qUseFPUand020    true
  38.     #else
  39.         #define    qUseFPUand020    false
  40.     #endif
  41. #endif
  42.  
  43. #endif applec
  44.  
  45.  
  46. /*=================================================================================================
  47. /* Common stuff
  48. /*-------------------------------------------------------------------------------------------------*/
  49. #ifndef    qUseFPUand020
  50.     #define    qUseFPUand020    false
  51. #endif
  52.  
  53. #define    qDebug                false                /* Flag for compiling a debug version
  54.                                                   * or normal version of this application */
  55.  
  56.  
  57.  
  58. #ifndef __MENUS__
  59. #include <Menus.h>
  60. #endif
  61.  
  62. #ifndef __TYPES__
  63. #include <Types.h>
  64. #endif
  65.  
  66. #ifndef __OSUTILS__
  67. #include <OSUtils.h>
  68. #endif
  69.  
  70.  
  71. /* From Sample.c */
  72. extern    SysEnvRec    gMac;                        /* The environment */
  73. extern    Boolean IsDAWindow (WindowPtr window);    /* In Sample.c */
  74.  
  75. /* Menu globals */
  76. extern    short        gObjectDisplayed;            /* Which object is being draw currently */                
  77. extern    short        gRenderingStyle;            /* iLineDrawing, iFlatShading, iFlatShadingWithOutline */                
  78. extern    Boolean        gDoBackfacedPolygonRemoval;
  79. extern    Boolean        gDoubleBuffer;
  80. extern    Boolean        gDrawInColor;
  81.  
  82. /* Utility routines */
  83. pascal    void        DebugMessage (Str255 message);
  84. pascal    void        EnableDisableItem (MenuHandle theMenu, short item, Boolean enable);
  85. pascal    void        LocalToGlobalRect (Rect *globalRect);
  86. pascal    void        MessageAlert (Str255 message);
  87. pascal    void        MessageAlertAndQuit (Str255 message);
  88. pascal    short        ScreenDepth (const Rect *globalRect);
  89.  
  90.  
  91. #endif __GLOBALS__